package com.unknow.first.mfa.config;

import com.unknow.first.mfa.aop.MfaAuthAspect;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(prefix = "system.mfa", name = "enabled", matchIfMissing = true)
@ComponentScan("com.unknow.first.mfa")
public class MfaAopConfig {

    @Bean
    public MfaAuthAspect mfaAuthAspect() {
        return new MfaAuthAspect();
    }
}
